//加载http模块
var http = require('http');
var fs = require('fs');
var cheerio = require('cheerio');

// var myHtml = fs.readFileSync("a.html");
// var $ = cheerio.load(myHtml);

//目标网站，嘿嘿，这个网站有很多实习职位
var pageUrl = 'http://booking.kayak.com/flights/TLV-PAR/2021-10-24?sort=bestflight_a';

http.get(pageUrl, function(res) {
    var html = '';
    res.on('data', function(data) {
        html += data;
    });
    res.on('end', function() {
        // console.log(html);
        var $ = cheerio.load(html);
        var t = $('html').find('.carrier');
        console.log(111)
        console.log('divs',t)
    });
});